<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title >用户反馈</title>
    <script src="../../seeker/js/commons.js"></script>
    <script src="../../seeker/js/jquery-3.6.0.js"></script>
    <style>
        .Content-Main{
    max-width: 500px;
    margin: auto;
    margin-top: 50px;
    padding: 20px 30px 20px 30px;
    font: 12px "Helvetica Neue", Helvetica, Arial, sans-serif;
    text-shadow: 1px 1px 1px #FFF;
    border: 1px solid #DDD;
    border-radius: 5px;
    color: #888;
    background: #FFF;
    }
    .Content-Main h1{
    display: block;
    padding: 0px 0px 10px 40px;
    margin: -10px -30px 30px -30px;
    font: 25px "Helvetica Neue", Helvetica, Arial, sans-serif;
    border-bottom: 1px solid #DADADA;
    color: #888;
    }
    .Content-Main h1>span{
    display: block;
    font-size: 11px;
    }
    .Content-Main label{
    display: block;
    margin: 0px 0px 5px;
    }
    .Content-Main label>span{
    float: left;
    width: 20%;
    padding-right: 10px;
    margin-top: 10px;
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-weight: bold;
    text-align: right;
    color: #333;
    }
    .Content-Main input[type="text"],.Content-Main textarea{
    width: 70%;
    height: 20px;
    padding: 5px 0px 5px 5px;
    margin-bottom: 16px;
    margin-right: 6px;
    margin-top: 2px;
    line-height: 15px;
    border-radius: 4px;
    border: 1px solid #CCC;
    color: #888;
    -webkit-border-radius: 4px;
    -moz-border-radius: 4px;
    -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
    box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
    -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
    }


    .Content-Main textarea{
    width: 70%;
    height: 100px;
    padding: 5px 0px 0px 5px;
    }
    .button{
    padding: 10px 25px 10px 25px;
    margin-left: 111px;
    border-radius: 4px;
    border:1px solid #CCC;
    background: #FFF;
    color: #333;
    }
    .button:hover{
    color: #333;
    background-color: #EBEBEB;
    border-color: #ADADAD;
    }
</style>
</head>
<body>
<div class="Content-Main">

    <div class="Content-Main1">
        <h1>用户反馈</h1>
    </div>
    <label style="text-align: center">
        <textarea  id="test" name="yourworks" cols ="50" rows = "5" placeholder="为解决您的问题，请您详细描述，不少于8字"></textarea>
        <br>
    </label>
        <label >
           <input type="submit" class="button" name="submit" value="反馈"/>

            <input type="submit" class="button" name="tijiao" value="建议"/>
        </label>



</div>

<script>
    function submit (){
        let yourworks = $("#test").val();
        console.log(yourworks);
        $.ajax({
            url: URL + "/question/advise",
            type: "post",
            data: {"yourworks":yourworks},


            success: function (yourworks){
                if (document.getElementById("test").value==''){
                    alert("反馈失败");
                } else {
                    alert("反馈成功")
                    window.location.href="http://localhost:63342/zhaopin61/web/seeker/html/main.html";
                }
            }
        });
        return false;
    }

    function tijiao (){
        let yourworks = $("#test").val();
        console.log(yourworks);
        $.ajax({
            url: URL + "/question/submit",
            type: "post",
            data: {"yourworks":yourworks},


            success: function (yourworks){
                if (document.getElementById("test").value==''){
                    alert("反馈失败");
                } else {
                    alert("反馈成功")
                    window.location.href="http://localhost:63342/zhaopin61/web/seeker/html/main.html";
                }
            }
        });
        return false;
    }


    $("input[name='submit']").on("click", function () {
        submit ();
    })

    $("input[name='tijiao']").on("click", function () {
        tijiao() ();
    })



</script>

</body>
</html>